<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <%@ taglib prefix="s" uri="http://www.springframework.org/tags" %>
<!DOCTYPE html>
<html>
<head>
<script src="/js/jquery.min.js"></script>
<meta charset="UTF-8">
<title><s:message code="EMPLOYEE.EDIT"></s:message></title>
</head>
<body>
<form action="/emp/update" method="Post">
<s:message code="EMPLOYEE.LASTNAME"></s:message>：<input type="text" name="lastName" value="${employee.lastName}"/><br>
<s:message code="EMPLOYEE.EMAIL"></s:message>：<input type="text" name="email" value="${employee.email}"/><br>
<s:message code="EMPLOYEE.GENDER"></s:message>：男<input type="radio" name="gender" value="男"/>  女<input type="radio" name="gender" value="女"/><br>
<input type="hidden" name="id" value="${employee.id}">
<input type="submit" value="<s:message code='SYS.SUBMIT'></s:message>">
</form>
</body>
<script>
$(function(){
	var gender = '${employee.gender}';
	if(!!gender ){
		if(gender == "男"){
			$('input:radio[name="gender"]:first').attr("checked","checked");
		}
		if(gender == "女"){
			$('input:radio[name="gender"]:last').attr("checked","checked");
		}
	}
	
})
</script>
</html>